define([],function(){
	var tpl = {};

	tpl.patients = function(){
		var html = "";
		html += patients();
		return html;
	}
	tpl.info = function(){
		var html = "";
		html += info();
		return html;
	}
	tpl.result = function(){
		var html = "";
		html += result();
		return html;
	}

	var patients = function(){
		return 	'<script id="gms_patients" type="text/html">'+
				'	{{each list as value}}'+
				'	<li data-patientId="{{value.patientId}}">'+
				'		<span>{{value.patientName}}</span>'+
				'		{{if value.gender == "F"}}'+
				'			<span class="sex sex-girl">女</span>'+
				'		{{else}}'+
				'			<span class="sex sex-boy">男</span>'+
				'		{{/if}}'+
				'		<span>{{value.age}}</span>'+
				'	</li>'+
				'	{{/each}}'+
				'</script>';
	}

	var info = function(){
		return 	'<script id="gms_info" type="text/html">'+
				'	<div class="gms-info">'+
				'		<div class="gms-tit">基本信息：</div>'+
				'		<div class="row">'+
				'			<div class="col-sm-6 col-md-4">姓名：{{if info.patientName}}{{info.patientName}}{{else}}{{info.userName}}{{/if}}</div>'+
				'			<div class="col-sm-6 col-md-4">性别：{{if info.gender}}{{if info.gender == "F"}}女{{else}}男{{/if}}{{else}}未知{{/if}}</div>'+
				'			<div class="col-sm-6 col-md-4">出生日期：{{if info.birthday}}{{info.birthday}}{{else}}未知{{/if}}</div>'+
				'			<div class="col-sm-6 col-md-4">孕周：{{info.pregnancyWeek}}</div>'+
				'			<div class="col-sm-6 col-md-4">周龄：{{info.weekAge}}</div>'+
				'		</div>'+
				'	</div>'+
				'	<div class="gms-form">'+
				'		<div class="row">'+
				'		  	<div class="form-group col-sm-6 col-md-6">'+
				'		  		<label class="control-label">本次评估体位：</label>'+
				'		  		<div class="control-input">'+
				'					<select class="form-control" id="posture">'+
				'						<option value="纵向体位">纵向体位</option>'+
				'						<option value="仰卧位">仰卧位</option>'+
				'					</select>'+
				'		  		</div>'+
				'		  	</div>'+
				'		  	<div class="form-group col-sm-6 col-md-6">'+
				'		  		<label class="control-label">本次评估时间：</label>'+
				'		  		<div class="control-input">'+
				'					<input type="date" class="form-control" id="testTime" value="{{nowDate}}">'+
				'		  		</div>'+
				'		  	</div>'+
				'			<div class="clearfix mb20">'+
				'				<div class="gms-tit col-sm-12 col-md-12">本次评估结果：</div>'+
				'				<div id="resultBox"></div>'+
				'			</div>'+
				'		  	<div class="form-group col-sm-12 col-md-12 mb20">'+
				'		  		<label class="control-label">指导意见：</label>'+
				'		  		<div class="control-input">'+
				'					<textarea class="form-control" id="guidance"></textarea>'+
				'		  		</div>'+
				'		  	</div>'+
				'		  	<div class="form-group col-sm-12 col-md-12 mb20">'+
				'		  		<label class="control-label">备注：</label>'+
				'		  		<div class="control-input">'+
				'					<textarea class="form-control" id="remark"></textarea>'+
				'		  		</div>'+
				'		  	</div>'+
				'			<div class="gms-btn-group">'+
				'				<button class="btn btn-default gms-empty">清空</button>'+
				'				<button class="btn btn-success gms-submit">保存</button>'+
				'			</div>'+
				'		</div>'+
				'	</div>'+
				'</script>';
	}

	var result = function(){
		return 	'<script id="gms_result" type="text/html">'+
				'	{{each resultStatus as value i}}'+
				'		{{if value.status == "1"}}'+
				'			<label class="radio-inline col-sm-4 col-md-4">'+
				'	  			<input type="radio" name="result" value="{{value.item}}" data-stage="{{value.stage}}" data-itemColor="{{value.itemColor}}"> {{value.item}}：{{value.stage}}'+
				'			</label>'+
				'		{{else}}'+
				'			<label class="radio-inline col-sm-4 col-md-4 disabled">'+
				'	  			<input type="radio" name="result" value="{{value.item}}" data-stage="{{value.stage}}" data-itemColor="{{value.itemColor}}" disabled> {{value.item}}：{{value.stage}}'+
				'			</label>'+
				'		{{/if}}'+
				'	{{/each}}'+
				'</script>';
	}

	return tpl;
});